package com.hrs.common.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import com.hrs.enity.vo.EnumVo;
import lombok.Getter;

import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;

/**
 * @author 计算机系 ITAEM 摆渡人
 * @description
 * @date 2022/11/20 13:51
 */
@Getter
public enum Nation {
    HAN(0, "汉族"),
    MONGOL(1,"蒙古族"),
    HUI(2,"回族"),
    TIBETAN(3,"藏族"),
    UYGHUR(4,"维吾尔族"),
    MIAO(5,"苗族"),
    YI(6,"彝族"),
    ZHUANG(7,"壮族"),
    BUYEI(8,"布依族"),
    KOREAN(9,"朝鲜族"),
    MANCHU(10,"满族"),
    DONG(11,"侗族"),
    YAO(12,"瑶族"),
    BAI(13,"白族"),
    TUJIA(14,"土家族"),
    HANI(15,"哈尼族"),
    KAZAK(16,"哈萨克族"),
    DAI(17,"傣族"),
    LI(18,"黎族"),
    LISU(19,"傈僳族"),
    VA(20,"佤族"),
    SHE(21,"畲族"),
    GAOSHAN(22,"高山族"),
    LAHU(23,"拉祜族"),
    SUI(24,"水族"),
    DONGXIANG(25,"东乡族"),
    NAXI(26, "纳西族"),
    JINGPO(27, "景颇族"),
    KIRGIZ(28, "柯尔克孜族"),
    TU(29, "土族"),
    DAUR(30, "达斡尔族"),
    MULAO(31, "仫佬族"),
    QIANG(32, "羌族"),
    BLANG(33, "布朗族"),
    SALAR(34, "撒拉族"),
    MAONAN(35, "毛南族"),
    GELAO(36, "仡佬族"),
    XIBE(37, "锡伯族"),
    ACHANG(38, "阿昌族"),
    PUMI(39, "普米族"),
    TAJIK(40, "塔吉克族"),
    NU(41, "怒族"),
    UZBEK(42,"乌孜别克族"),
    RUSSIANS(43, "俄罗斯族"),
    EWENKI(44, "鄂温克族"),
    DEANG(45, "德昂族"),
    BONAN(46, "保安族"),
    YUGUR (47, "裕固族"),
    GIN(48, "京族"),
    TATAR(49, "塔塔尔族"),
    DERUNG(50, "独龙族"),
    OROQEN(51, "鄂伦春族"),
    HEZHEN(52, "赫哲族"),
    MONBA(53, "门巴族"),
    LHOBA(54, "珞巴族"),
    JINO(55, "基诺族"),
    OTHER(56,"其他"),
    FOREIGN_COUNTRY(57,"外国血统中国籍人士");

    @EnumValue
    private final Integer code;
    private final String display;

    Nation(Integer code, String display) {
        this.code = code;
        this.display = display;
    }

    public static List<EnumVo> getEnumVos() {
        List<EnumVo> enumVos = new ArrayList<>();
        EnumSet.allOf(Nation.class)
                .forEach(nation -> {
                    EnumVo enumVo = new EnumVo();
                    enumVo.setCode(nation.code);
                    enumVo.setDisplay(nation.display);
                    enumVos.add(enumVo);
                });

        return enumVos;
    }
}
